home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / cutils.arc / MOVE.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-08-30  |  1.3 KB  |  33 lines

  1.                         TITLE   Move commands for 11:11
  2.                         NAME    MOVED
  3.                         INCLUDE DOS.MAC
  4. COMMENT $
  5.                 AUTHOR          Jon Wesener
  6.                 DATE            7 / 26 / 85
  7.                 PURPOSE            This bit of code will allow me to
  8.                                 fill a buffer with data from any segment.
  9.         $
  10.  
  11.  
  12.                 PSEG
  13.                 PUBLIC  MOVE
  14. ; Move will move count number of bytes from segment:offset to buffer.
  15. ;  move(buffer, seg, offs, count);
  16. ; return        nothing
  17. ; NOTE:         If an invalid segment is used, I have no idea what
  18. ;               will be returned
  19.  
  20. MOVE            PROC    NEAR
  21.                 push    bp
  22.                 mov     bp, sp
  23.                 mov     di, [bp+4]      ; get destination buffer
  24.                 mov     ds, [bp+6]      ; get segment to move
  25.                 mov     si, [bp+8]      ; get offset for move
  26.                 mov     cx, [bp+10]     ; get count
  27.                 rep     movsb           ; move it
  28.                 pop     bp
  29.                 ret
  30. MOVE            ENDP
  31.                 ENDPS
  32.                 END
  33.